# coding=utf-8
a = set([1, 2, 3, 4, 5])
b = set([2, 4, 6, 8, 10])

print a - b   # set([1, 3, 5])
print a | b   # set([1, 2, 3, 4, 5, 6, 8, 10])
print a & b   # set([2, 4])
print a ^ b   # set([1, 3, 5, 6, 8, 10])




s = {x for x in 'abracadabra' if x not in 'abc'}
print s # set(['r', 'd'])
s = {x:x for x in 'abracadabra' if x not in 'abc'}
print s # {'r': 'r', 'd': 'd'}
